Remove bookmark duplicate of shortcut
authorTimothy Arceri <t_arceri@yahoo.com.au>
Wed, 31 Oct 2012 11:05:48 +0000 (22:05 +1100)
committerFederico Mena Quintero <federico@gnome.org>
Tue, 13 Nov 2012 18:54:15 +0000 (12:54 -0600)
Application code can set shortcut folders that are already bookmarks.
This code causes the bookmarks to be refreshed after the shortcut is
added removing any possible bookmark duplicates

https://bugzilla.gnome.org/show_bug.cgi?id=577806

gtk/gtkfilechooserdefault.c

index 09d6303c8257aafd8c235ef2719af071fba1be58..ceab128be1773ae3b0c45907d2019eff9f073865 100644 (file)
@@ -7978,6 +7978,9 @@ add_shortcut_get_info_cb (GCancellable *cancellable,
 
   shortcuts_insert_file (data->impl, pos, SHORTCUT_TYPE_FILE, NULL, data->file, NULL, FALSE, SHORTCUTS_SHORTCUTS);
 
+  /* need to call shortcuts_add_bookmarks to flush out any duplicates bug #577806 */
+  shortcuts_add_bookmarks (data->impl);
+
 out:
   g_object_unref (data->impl);
   g_object_unref (data->file);